package com.uraurora.crescent.tuple;

import com.uraurora.crescent.util.SeiIterables;

public class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> extends AbstractTuple implements ITuple {

    private final static int SIZE = 8;

    private Tuple8(Object[] values){
        super(values);
    }

    public static <T1, T2, T3, T4, T5, T6, T7, T8> com.uraurora.crescent.tuple.Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> of(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8){
        Object[] objects = {t1, t2, t3, t4, t5, t6, t7, t8};
        return new com.uraurora.crescent.tuple.Tuple8<>(objects);
    }

    static <T1, T2, T3, T4, T5, T6, T7, T8> com.uraurora.crescent.tuple.Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> of(Iterable<?> iterable){
        Object[] obj = SeiIterables.toArray(iterable, SIZE);
        return new com.uraurora.crescent.tuple.Tuple8<>(obj);
    }

}
